package com.zhike.service.reportfeedback.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhike.common.model.Report;
import com.zhike.mapper.reportfeedback.ZhikeUserReportMapper;
import com.zhike.service.reportfeedback.ZhikeUserReportService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * 用户举报实现类
 */
@Service
public class ZhikeUserReportServiceImpl extends ServiceImpl<ZhikeUserReportMapper, Report>
        implements ZhikeUserReportService {

    @Resource
    private ZhikeUserReportMapper mapper;

    @Override
    public Boolean addReport(Report dto) {
        dto.setCreateTime(new Date());
        return mapper.insert(dto) > 0;
    }
}
